#!/bin/bash

make

cd rel && rm -rf im_server.zip && cd ..

cd rel && ../rebar generate -f && rm -f im_server/etc/sys.config && cp files/sys.config.formal im_server/etc/sys.config && zip  -r im_server.zip im_server && cd ..

scp rel/im_server.zip root@IM_SERVER_FORMAL:/opt/etcloud/

ssh root@IM_SERVER_FORMAL '/opt/etcloud/install.sh im_server'

